<#include "/admin_common/_layout.html" />


<@layout>
  <!-- content start -->
  <div class="admin-content">
    <div class="am-cf am-padding">
      <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">个人资料</strong> / <small>Personal information</small></div>
    </div>

    <hr/>

    <div class="am-g">

      <div class="am-u-sm-12 am-u-md-4 am-u-md-push-8">
        <div class="am-panel am-panel-default">
          <div class="am-panel-bd">
            <div class="am-g">
              <div class="am-u-md-4">
                <img class="am-img-circle am-img-thumbnail" src="/upload/${user.avatar}" alt=""/>
              </div>
              <div class="am-u-md-8">
                <p>暂不支持网络URL头像，只支持本地上传。</p>
                <form class="am-form" action="/admin/avatar" method="post" enctype="multipart/form-data">
                	
                <div class="am-form-group" style="display:none">
            		<label for="user-name" class="am-u-sm-3 am-form-label">标识 / Id</label>
            		<div class="am-u-sm-9">
              			<input type="text" id="user-name" placeholder="标识 / Name" value="${user.id}" readonly name="admin.id">
              			<small>自动载入标识。</small>
            		</div>
          		</div>		
                	
                  <div class="am-form-group">
                    <input type="file" id="file" name="admin.file" >
                    <p class="am-form-help">请选择要上传的文件...</p>
                    <input type="submit" class="am-btn am-btn-primary am-btn-xs" value="保存">
                  </div>
                </form>
              </div>
            </div>
          </div>
        </div>

        
        
        
        
        <div class="am-panel am-panel-default" style="display:none">
          <div class="am-panel-bd">
            <div class="user-info">
              <p>等级信息</p>
              <div class="am-progress am-progress-sm">
                <div class="am-progress-bar" style="width: 60%"></div>
              </div>
              <p class="user-info-order">当前等级：<strong>LV8</strong> 活跃天数：<strong>587</strong> 距离下一级别：<strong>160</strong></p>
            </div>
            <div class="user-info">
              <p>信用信息</p>
              <div class="am-progress am-progress-sm">
                <div class="am-progress-bar am-progress-bar-success" style="width: 80%"></div>
              </div>
              <p class="user-info-order">信用等级：正常当前 信用积分：<strong>80</strong></p>
            </div>
          </div>
        </div>
        
        
        
        
        
        
         <form  action="/admin/updatepsw/" method="POST" onsubmit="return valipsw();">
         
          <div class="am-form-group" style="display:none">
            		<label for="user-name" class="am-u-sm-3 am-form-label">标识 / Id</label>
            		<div class="am-u-sm-9">
              			<input type="text" id="user-name" placeholder="标识 / Name" value="${user.id}" readonly name="admin.id">
              			<small>自动载入标识。</small>
            		</div>
          		</div>	
        
         <div class="am-panel am-panel-default" >
          <div class="am-panel-bd">
            <div class="user-info">
              <p>修改密码</p>
             
              
            <#if (pswReturn??)>
				 <p style="color:red">${pswReturn}</p>
			</#if>
			<p style="color:red" id="difference"></p>
              
              
              
              <input type="password" name="psw1" id="psw1">
              <p class="user-info-order">输入新的密码。</p>
              <input type="password" name="admin.password" id="psw2">
              <p class="user-info-order">确认密码。</p>
              <input type="submit" class="am-btn am-btn-primary am-btn-xs" value="保存">
            </div>            
          </div>
        </div>
        </form>
        
        <script>
        function valipsw(){
        	var psw1 = $("#psw1").val();
        	var psw2 = $("#psw2").val();
        	if(psw1 != psw2){
        		$("#difference").html("两次密码不一致");
        		return false;  
        	}
        }
        </script>
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        

      </div>

      <div class="am-u-sm-12 am-u-md-8 am-u-md-pull-4">
        <form class="am-form am-form-horizontal" action="/admin/updateuser/" method="POST">
        
		<div class="am-form-group" style="display:none">
            <label for="user-name" class="am-u-sm-3 am-form-label">标识 / Id</label>
            <div class="am-u-sm-9">
              <input type="text" id="user-name" placeholder="标识 / Name" value="${user.id}" readonly name="admin.id">
              <small>自动载入标识。</small>
            </div>
          </div>
       
       
        
          <div class="am-form-group">
            <label for="user-name" class="am-u-sm-3 am-form-label">姓名 / Name</label>
            <div class="am-u-sm-9">
              <input type="text" id="user-name" placeholder="姓名 / Name" value="${user.name}" name="admin.name">
              <small>输入你的名字，让我们记住你。</small>
            </div>
          </div>

          <div class="am-form-group">
            <label for="user-email" class="am-u-sm-3 am-form-label">电子邮件 / Email</label>
            <div class="am-u-sm-9">
              <input type="email" id="user-email" placeholder="输入你的电子邮件 / Email" value="${user.email}" name="admin.email">
              <small>邮箱你懂得...</small>
            </div>
          </div>

          <div class="am-form-group">
            <label for="user-phone" class="am-u-sm-3 am-form-label">电话 / Telephone</label>
            <div class="am-u-sm-9">
              <input type="text" id="user-phone" placeholder="输入你的电话号码 / Telephone" value="${user.telephone}" name="admin.telephone">
            </div>
          </div>

          <div class="am-form-group">
            <label for="user-QQ" class="am-u-sm-3 am-form-label">QQ</label>
            <div class="am-u-sm-9">
              <input type="text" id="user-QQ" placeholder="输入你的QQ号码" value="${user.qq}" name="admin.qq">
            </div>
          </div>

          <div class="am-form-group">
            <label for="user-weibo" class="am-u-sm-3 am-form-label">微博 / Twitter</label>
            <div class="am-u-sm-9">
              <input type="text" id="user-weibo" placeholder="输入你的微博 / Twitter" value="${user.twitter}" name="admin.twitter">
            </div>
          </div>

          <div class="am-form-group">
            <label for="user-intro" class="am-u-sm-3 am-form-label">简介 / Intro</label>
            <div class="am-u-sm-9">
              <textarea class="" rows="5" id="user-intro" placeholder="输入个人简介" name="admin.intro">${user.intro}</textarea>
              <small>250字以内写出你的一生...</small>
            </div>
          </div>

          <div class="am-form-group">
            <div class="am-u-sm-9 am-u-sm-push-3">
              <input type="submit" class="am-btn am-btn-primary" value="保存修改">
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
  <!-- content end -->

</div>

<a href="#" class="am-icon-btn am-icon-th-list am-show-sm-only admin-menu" data-am-offcanvas="{target: '#admin-offcanvas'}"></a>

<footer>
  <hr>
  <p class="am-padding-left">© 2014 AllMobilize, Inc. Licensed under MIT license.</p>
</footer>

<!--[if lt IE 9]>
<script src="http://libs.baidu.com/jquery/1.11.3/jquery.min.js"></script>
<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="/js/amazeui.ie8polyfill.min.js"></script>
<![endif]-->

<!--[if (gte IE 9)|!(IE)]><!-->
<script src="/js/jquery.min.js"></script>
<!--<![endif]-->
<script src="/js/amazeui.min.js"></script>

<script src="/js/app.js"></script>
</body>
</html>


</@layout>
